package com.hotel.controller;

import com.hotel.service.InventoryService;
import com.hotel.vo.PageResult;
import com.hotel.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by LuJinRong
 * @date 2021/8/3。
 * @time 17:16。
 */
@RestController
@RequestMapping("/Inventory")
@CrossOrigin
public class InventoryController {

    @Autowired
    private InventoryService inventoryService;

    @GetMapping("/findAll")
    public SysResult findAll(PageResult pageResult){

        return SysResult.success(inventoryService.findAll(pageResult));
    }


}
